package br.com.sipe.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import br.com.arquitetura.DAO.UniversalDAO;
import br.com.sipe.DAO.ParticipanteDAO;
import br.com.sipe.entidade.Participante;
import br.com.sipe.service.ParticipanteService;

@Service(value = "ParticipanteService")
@Transactional(readOnly = true, rollbackFor = Exception.class, propagation = Propagation.SUPPORTS)
public class ParticipanteServiceImpl implements ParticipanteService {

	@Autowired(required = true)
	@Qualifier(value = "universalDAO")
	protected UniversalDAO dao;

	@Autowired(required = true)
	@Qualifier(value = "ParticipanteDAO")
	protected ParticipanteDAO participanteDAO;

	@Override
	public Long countParticipante(Participante model, Map filters) {
		return participanteDAO.countParticipante(model, filters);
	}

	@Override
	public List<Participante> paginateParticipante(int first, int pageSize, String sortField, boolean sort, Participante model, Map filters) {
		// TODO Auto-generated method stub
		return participanteDAO.paginateParticipante(first, pageSize, sortField, sort, model, filters);
	}

}
